import request from "../utils/request";
// 栏目
export function getNews(params) {
    return request({
        url: "/post",
        method: "get",
        params
    })
}
// 获取文章详情
export function getArticleDetail(id) {
    return request({
        url: "/post/" + id,
        method: "get"
    })
}
// 新闻的评论列表接口
export function post_comment(id) {
    return request({
        url: "/post_comment/" + id,
        method: "get"
    })
}
// 发表评论 /post_comment/:id
export function pulish(id, data) {
    return request({
        url: "/post_comment/" + id,
        method: "post",
        data
    })
}
// 收藏文章接口的封装/post_star/:id
export function post_star(id) {
    return request({
        url: "/post_star/" + id,
        method: "get"
    })
}